-include Makefile.config

EXEC = mytool
SOURCES = $(wildcard *.c)
OBJECTS = $(SOURCES:%.c=%.o)

CC = gcc
CC_FLAGS = -Wall -pedantic -o0 -g
LD_FLAGS = -ldl

$(EXEC): $(OBJECTS)
	$(CC) $(OBJECTS) -o $(EXEC) $(LD_FLAGS)

%.o: %.c
	$(CC) -c $(CC_FLAGS) $< -o $@

doc:
	 PROJECT=$(PROJECT) DOXYOUT=$(DOXYOUT) VERSION=$(VERSION) doxygen

clean:
	rm -rf $(EXEC) $(OBJECTS)
